.chat-box {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    max-height: 70%; /* 你可以根据需要调整这个值 */
    overflow-y: auto;
    margin-bottom: 5px;
}

.chat-container {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 10px;
    height: 540px;
}


#messages {
    overflow-y: hidden;
    flex-grow: 1;
    border: 5px solid white;
    border-radius: 10px;
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    height: 540px;
    max-height: 540px; /* 设置最大高度以便出现滚动条 */
}


.message {
    margin: 5px 0;
    padding: 10px;
    max-width: 95%;
    display: flex;
    flex-direction: column;
}

.message .message-content {
    font-family: 阿里巴巴普惠体;
    width: auto;
    display: inline-block;
    overflow-wrap: break-word;
}

.message .userName {
    font-family: 阿里巴巴普惠体;
    color: white;
    font-weight: bold;
    margin-bottom: 5px;
}

.message .selfUserName {
    text-align: right;
}

.message .otherUsername {
    margin-bottom: 5px;
}

.message.self {
    align-self: flex-end;
}

.message.other {
    align-self: flex-start;
}

.message.system {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 10px;
    max-width: 70%;
    text-align: center; /* 文本居中 */
    margin: 5px 0;
    align-self: center;
    font-size: xx-small;
}

.message-text {
    font-size: 20px;
    line-height: 50px;
    padding: 0 5px 0 5px;
    border: 5px solid #FFF;
    word-break: break-all;
    color: white;
}

.message-text.self {
    border-radius: 20px 0 20px 20px;
}

.message-text.other {
    border-radius: 0 20px 20px 20px;
}